package com.itclub.ssh.action;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.itclub.ssh.domain.Friendlink;
import com.itclub.ssh.service.IndexService;
import com.opensymphony.xwork2.ActionSupport;
/**
 * 首页action
 * @author chiaki
 *
 */
@Controller("indexAction")
public class IndexAction extends ActionSupport {
	@Resource
	private IndexService indexService;
	private List<Friendlink> friendlinks=new ArrayList<Friendlink>();
	
	public List<Friendlink> getFriendlinks() {
		return friendlinks;
	}



	public void setFriendlinks(List<Friendlink> friendlinks) {
		this.friendlinks = friendlinks;
	}



	@Override
	public String execute() throws Exception {
		//friendlinks=indexService.getFriendlinks();
		List list =indexService.getFriendlinks();
		setFriendlinks(list);
		return SUCCESS;
	}
 
	

}
